/**
 * Created by arnold.zhu on 7/5/2017.
 */
import axios from 'axios';

class RoleService {

  getRoleList(params) {
    return new Promise((resolve, reject) => {
      axios.post('/api/login2', params).then(function (response) {
        const data = [];
        for (let i = 0; i < 46; i++) {
          data.push({
            key: i,
            id: i,
            name: `李大嘴${i}`,
            age: 32,
            address: `西湖区湖底公园${i}号`,
          });
        }
        response.data = data;
        resolve(response.data);
      }).catch(function (error) {
        reject(error);
      });
    });
  }

}

export default new RoleService();